//
//  User.h
//  晟轩超市
//
//  Created by Seven on 15/9/8.
//  Copyright (c) 2015年 Toocms. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface levelRulesModel :NSObject
@property (nonatomic, copy) NSString *level;// = "1",
@property (nonatomic, copy) NSString *name;// = "普通用户",
@property (nonatomic, copy) NSString *percent;// = "2",
@property (nonatomic, copy) NSString *conditions;// = "0",
@end


@interface order_type_1Model :NSObject

@property (nonatomic, copy) NSString *status_2 ;//= "4";//,
@property (nonatomic, copy) NSString *status_1 ;//= "3";//,
@property (nonatomic, copy) NSString *status_4 ;//= "0";//,
@property (nonatomic, copy) NSString *status_3 ;//= "0";//,
@end

@interface order_type_2Model :NSObject

@property (nonatomic, copy) NSString *status_2 ;//= "2";//,
@property (nonatomic, copy) NSString *status_1 ;//= "1";//,
@property (nonatomic, copy) NSString *status_4 ;//= "3";//,
@property (nonatomic, copy) NSString *status_7 ;//= "3";//,
@property (nonatomic, copy) NSString *status_3 ;//= "4";//,
@end


@interface TSUserInfo : NSObject


@property (nonatomic, copy) NSString * m_id; //用户ID
@property (nonatomic, copy) NSString *account;//": 账号
@property (nonatomic, copy) NSString *account_format;//": 绑定手机号
@property (nonatomic, copy) NSString *nickname;//": 昵称/店铺名称
@property (nonatomic, copy) NSString *avatar;//": 头像（文件ID）
@property (nonatomic, copy) NSString *head;//": 头像路径
@property (nonatomic, copy) NSString *balance;//": 余额
@property (nonatomic, copy) NSString *integral;//": 积分
@property (nonatomic, copy) NSString *b_notice;//公告
@property (nonatomic, copy) NSString *address;//详细地址
@property (nonatomic, copy) NSArray *pictures;//店内图/轮播图
@property (nonatomic, copy) NSString *shop_status;//": 开店状态标识 4--未提交审核 3--审核中  2--拒绝通过  1--正常  0--禁用
@property (nonatomic, copy) NSString *check_status;//审核状态：1-通过 2-拒绝 3-审核中 4-未申请认证
@property (nonatomic, copy) NSString *pay_pass_status;//是否设置提现密码 1-是 0-否
@property (nonatomic, copy) NSString *shop_id;//": 店铺ID

@property (nonatomic, copy) NSString *member_sn;//": 用户编号-邀请码
@property (nonatomic, copy) NSString *gender;//": 性别 1--男  2--女
@property (nonatomic, copy) NSString *province_id;//": 省ID
@property (nonatomic, copy) NSString *province_name;//": 省名称
@property (nonatomic, copy) NSString *city_id;//": 城市ID
@property (nonatomic, copy) NSString *city_name;//": 城市名称
@property (nonatomic, copy) NSString *district_id;//": 区/县ID
@property (nonatomic, copy) NSString *district_name;//": 区/县名称
@property (nonatomic, copy) NSString *brokerage;//": 分销佣金
@property (nonatomic, copy) NSString *is_pay_pass;//": 是否设置了支付密码，0--否  1--是
@property (nonatomic, copy) NSString *qq;//": 是否绑定了qq  0--否  1--是
@property (nonatomic, copy) NSString *wx;//": 是否绑定了微信  0--否  1--是
@property (nonatomic, strong) order_type_2Model *order_type_2 ;//= 	{


@property (nonatomic, strong) order_type_1Model *order_type_1;// = 	{
@property (nonatomic, copy) NSString *not_read;//0--否  1--是

@property (nonatomic, copy) NSString *share_url;// = "http://baihui-wap.toocms.com/Share/index/code/8406",

@property (nonatomic, copy) NSString *up_conditions;// = "还差4人升级为文艺用户",

@property (nonatomic, copy) NSString *level;// = "1",
@property (nonatomic, copy) NSString *has_users;//已经邀请
@property (nonatomic, copy) NSString *level_name;// = "普通用户",
@property (nonatomic, copy) NSString *trial;//"：试用金

@property (nonatomic, strong) NSArray<levelRulesModel *> *level_rules;// =

@end

@interface User : NSObject

@property (nonatomic, assign, getter=isLogin) BOOL login;
/// 用户的信息
@property (nonatomic, strong) TSUserInfo * userInfo;

///  是否需要发通知（用于支付完成时候的回调，从支付宝\微信返回的时候，需要在appDelegate里面发通知，刷新状态）
@property (nonatomic, assign, getter=isNeedSendNotifyNotification) BOOL needSendNotifyNotification;

+ (instancetype)sharedUser;
+ (BOOL)userIsLogin ;
/**
 *  保存用户信息
 *
 *  @param userInfo 用户信息字典
 *
 *  @return 是否保存成功
 */
+ (BOOL)saveUserInfomation:(NSDictionary *)userInfo;


///  从沙盒中获取用户信息
///
///  @return 用户字典或nil
+ (TSUserInfo *)getUserInfomation;
/**
 *  删除用户信息
 *
 *  @return 是否删除成功
 */
+ (BOOL)removeUserInfomation;
/**
 *  移除userDefaults key对应的object
 *
 *  @param key key
 */
+ (void)removeUseDefaultsForKey:(NSString *)key;
/**
 *  移除userDefaults keys对应的objects
 *
 *  @param keysArray 传入数组，里面存放key
 */
+ (void)removeUseDefaultsForKeys:(NSArray *)keysArray;
//
+ (void)printPropertyName:(NSDictionary *)dict;
@end
